<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/web-frame/element/js/vue.js"></script>
</head>
<body>
<div id="app">

    <h2>文本输入</h2>
    <input v-model="message" placeholder="edit me" />
    <p>Message is: {{ message }}</p>

    <hr>

    <h2>单选</h2>
    <div id="v-model-radiobutton">
        <input type="radio" id="one" value="One" v-model="picked" />
        <label for="one">One</label>
        <br />
        <input type="radio" id="two" value="Two" v-model="picked" />
        <label for="two">Two</label>
        <br />
        <span>Picked: {{ picked }}</span>
    </div>

    <hr>

    <h2>复选</h2>
    <input type="checkbox" id="checkbox" v-model="checked" />
    <label for="checkbox">{{ checked }}</label>

    <hr>

    <h2>多个复选</h2>

    <div id="v-model-multiple-checkboxes">
        <input type="checkbox" id="jack" value="Jack" v-model="checkedNames" />
        <label for="jack">Jack</label>
        <input type="checkbox" id="john" value="John" v-model="checkedNames" />
        <label for="john">John</label>
        <input type="checkbox" id="mike" value="Mike" v-model="checkedNames" />
        <label for="mike">Mike</label>
        <br />
        <span>Checked names: {{ checkedNames }}</span>
    </div>

    <hr>

    <h2>选择框</h2>

    <div id="v-model-select" class="demo">
        <select v-model="selected">
            <option disabled value="">Please select one</option>
            <option>A</option>
            <option>B</option>
            <option>C</option>
        </select>
        <span>Selected: {{ selected }}</span>
    </div>


</div>
<script>
    var Main = {
        data() {
            return {
                picked: '',
                message:'',
                checked:'',
                checkedNames: [],
                selected: ''
            }
        },
        created(){

        },
        methods: {

        },
        computed: {
        }
    }
    var Ctor = Vue.extend(Main)
    new Ctor().$mount('#app')
</script>
</body>
</html>